package com.hmy.common.timer;

import java.util.concurrent.TimeUnit;

class ShowMemoryTask implements TimerTask {

    @Override
    public void run(Timeout timeout) throws Exception {
        if (timeout.isCancelled()) {
            return;
        }
        long l = Runtime.getRuntime().totalMemory();
        TimeUnit.SECONDS.sleep(3);
        System.out.println("JVM总内存大小为：" + l);
    }
}
